﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AdminUploadMCE.aspx.cs" Inherits="ACP_AdminUploadMCE" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Import Namespace="EasyCode.Utility" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script src='<%= this.ResolveUrl("~/App_Themes/js/jquery-1.4.2.min.js")%>' type="text/javascript"></script>
    <script src="../App_Themes/js/jquery.filestyle.js" type="text/javascript"></script>
    <link href="../App_Themes/themes/default/css/uploadMCE.css" rel="stylesheet" type="text/css" />
    <link href="../App_Themes/basic_css/reset.css" rel="stylesheet" type="text/css" />
    <!-- Default style -->
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <script src="../App_Themes/js/wz_tooltip.js" type="text/javascript"></script>
        <asp:ScriptManager runat="server" ID="ScriptManagerFile">
        </asp:ScriptManager>
        <div class="photo_uploader_window">
            <asp:UpdatePanel runat="server" ID="UpdatePanelFile">
                <ContentTemplate>
                    <div class="content_popup">
                        <asp:Literal runat="server" ID="LiteralNoRecord" Text="Data not found." Visible="false"></asp:Literal>
                        <div class="uploader_filelist" runat="server" id="divRecord">
                            <ul class="uploader_h_cols">
                                <li><span class="h_del">No</span> <span class="filename">
                                    <label>
                                        File name:</label></span>
                                    <br clear="all" />
                                </li>
                            </ul>
                            <asp:Repeater runat="server" ID="RepeaterPhoto" OnItemCommand="RepeaterPhoto_ItemCommand"
                                OnItemDataBound="RepeaterPhoto_ItemDataBound">
                                <ItemTemplate>
                                    <ul>
                                        <li><span class="stt">
                                            <%# this.GetStt() %></span> <span class="filename">
                                                <asp:HyperLink runat="server" ID="HyperLinkFileName" NavigateUrl="javascript:void('0');"
                                                    Text=' <%# Eval("Value") != null ? Commons.SmartLimTitle(HttpUtility.HtmlDecode(System.IO.Path.GetFileName(Eval("Value").ToString())),50) : "" %>'></asp:HyperLink>
                                            </span><span style="margin-left: 0; margin-right: 0;" runat="server" id="spanDel">
                                                <asp:ImageButton runat="server" ID="ImageButton1" Text="Delete" CommandArgument='<%# System.IO.Path.GetFileName(Protector.String(Eval("Value"))) %>'
                                                    ToolTip="Delete" CommandName="Delete" class="del_icon fl" OnClientClick='return DeleteConfirm();'>
                                                </asp:ImageButton>
                                            </span>
                                            <br clear="all">
                                        </li>
                                    </ul>
                                </ItemTemplate>
                            </asp:Repeater>
                            <div class="clr">
                            </div>
                            <asp:Literal runat="server" ID="LiteralPaging"></asp:Literal>
                        </div>
                        <div class="clr">
                        </div>
                    </div>
                </ContentTemplate>
            </asp:UpdatePanel>
            <div class="popup_bottomform">
                <div class="formrow">                  
                    <div class="fl filetype">
                        <asp:FileUpload runat="server" CssClass="file fileupload" ID="FileUpload" />
                    </div>
                    <div class="df_ibtn fl">
                        <asp:Button runat="server" ID="ButtonUpload" OnClick="ButtonUpload_Click" Text="UpLoad" /></div>
                    <div class="clr">
                    </div>
                </div>
            </div>
        </div>
        <script type="text/javascript" language="javascript">
            function ClickClose() {
                parent.$.fn.colorbox.close();
            }

            function UploadSuss() {
                alert('Updated successfully.');
                window.location.href = window.location.href;
            }

            function ErrorFileUpload() {
                alert('File type is invalid.');
            }

            function CloseMCE() {
                tinyMCEPopup.close();
            }      
        </script>
    </div>
    </form>
</body>
</html>
